package com.itheima.demo1;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

public class Demo5 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("xc");
        list.add("ssd");
        list.add("sd");
        Iterator<String> s=list.iterator();
        while (s.hasNext()){
            s.next();
            s.remove();
        }


    }
}
